/**   
 * 项目名：五位一体化工安全信息平台
 * 日期：    2019-11-24 22:18:20  
 * Copyright (c) 2015- joysuch-版权所有     
 */
package com.joysuch.wwyt.risk.repository;

import com.joysuch.wwyt.risk.entity.RiskPointEvaluationScl;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;


/**
 * RiskPointEvaluationSclDao
 * 
 */
public interface RiskPointEvaluationSclDao extends JpaRepository<RiskPointEvaluationScl, Long> {
    public Page<RiskPointEvaluationScl> findAll(Specification<RiskPointEvaluationScl> spec, Pageable pageable);

    public RiskPointEvaluationScl save(RiskPointEvaluationScl bean);

    public void delete(RiskPointEvaluationScl bean);

    @Query(value = "SELECT * FROM wwyt_risk_point_evaluation_scl WHERE FACILITY_ID =?1 AND DELETE_FLAG = '0'",nativeQuery = true)
    List<RiskPointEvaluationScl> findByFacilityId(Long productFacilityId);
}
